package 算法;

public class sort {
    /**
     * O(nums.length*nums.length)
     */
    public int[] maopao(int[] nums){
        int temp;
        if(nums.length==0)
            return nums;
        for (int i=0;i<nums.length;i++){
            for (int j=0;j<nums.length-1-i;j++){
                if(nums[j+1]<nums[j]){
                    temp=nums[j+1];
                    nums[j+1]=nums[j];
                    nums[j]=temp;
                }
            }
        }

        return nums;
    }
}
